U_CAPI void U_EXPORT2 ucnv_fromUnicode (UConverter * converter, char **target, const char *targetLimit, const UChar ** source, const UChar * sourceLimit, int32_t* offsets, bool_t flush, UErrorCode * err)

Transcodes an array of unicode characters to an array of codepage characters

Documentation

Transcodes an array of unicode characters to an array of codepage characters. The source pointer is an I/O parameter, it starts out pointing where the function is to begin transcoding, and ends up pointing after the first sequence of the bytes that it encounters that are semantically invalid. if ucnv_setToUCallBack is called with an action other than STOP before a call is made to this API, consumed and source should point to the same place (unless target ends with an imcomplete sequence of bytes and flush is FALSE). the target buffer buffer needs to be a least the size of the maximum # of bytes per characters allowed by the target codepage.
Parameters:
converter - the Unicode converter
converter - the Unicode converter
target - : I/O parameter. Input : Points to the beginning of the buffer to copy codepage characters to. Output : points to after the last codepage character copied to target.
targetLimit - the pointer to the end of the target array
source - the source Unicode character array
sourceLimit - the pointer to the end of the source array
offsets - if NULL is passed, nothing will happen to it, otherwise it needs to have the same number of allocated cells as target. Will fill in offsets from target to source pointer e.g: offsets[3] is equal to 6, it means that the target[3] was a result of transcoding source[6] For output data carried across calls -1 will be placed for offsets.
flush - TRUE if the buffer is the last buffer of the conversion interation and the conversion will finish with this call, FALSE otherwise.
err - the error status. U_ILLEGAL_ARGUMENT_ERROR will be returned if the converter is NULL.
See Also:
ucnv_fromUChars
ucnv_convert
ucnv_getMinCharSize
ucnv_setToUCallBack

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de